import React from 'react';
import { Layer, Stage, Rect, Image, Text } from 'react-konva';
const Calendar2 = ({ img, date,text}: any) => {
  const color = '#e0e5e9'
  const color2 = '#587300'
  return (<Stage width={500} height={800}>
    <Layer >
      <Rect fill={color} x={0} y={0} width={500} height={800} />
      <Text x={20} y={90} letterSpacing={10} text='GOOD' fill='#fff' fontSize={35} />
      <Text x={80} y={120} letterSpacing={10} text='MORNING' fill='#fff' fontSize={20} />
      <Text x={60} fontWeight="bold" y={70} text='早安' fill={color2} fontSize={30} />
      <Text x={125} y={80} text='记录美好' fill={color2} fontSize={12} />
      <Text x={80} fontWeight="bold" y={110} text='你好' fill={color2} fontSize={50} />
      <Rect
        width={80}
        height={100}
        x={364}
        y={84}
        strokeWidth={1}
        stroke={color2}
      />
      <Rect
        width={80}
        height={100}
        x={360}
        y={80}
        fill={color}
        strokeWidth={1}
        stroke={color2}
      />
      <Text
        text={`${date.format('MM')}/${date.format('DD')}`}
        x={374}
        fontSize={20}
        y={100}
        fill={color2}
      />
      <Text
        text={date.format('YYYY')}
        x={374}
        fontSize={20}
        y={126}
        fill={color2}
      />
      <Text
        text={date.locale('zh-cn').format('dddd')}
        x={374}
        fontSize={20}
        y={150}
        fill={color2}
      />
      <Rect
        x={300}
        y={100}
      />
     
      <Rect
        fill='#fff'
        x={40}
        y={200}
        width={420}
        height={580}
      />
      <Image x={60} y={220} width={380} height={480} image={img} />
      <Text y={710} lineHeight={1.5} fontStyle="bold" x={100} fontSize={15} fill={color2} text={text} />
       <Text 
      text='「'
      fontSize={25}
      y={710}
      x={40}
      fill={color2}
      />
       <Text 
      text='」'
      fontSize={25}
      y={740}
      x={430}
      fill={color2}
      />
    </Layer>
  </Stage>)
}
export default Calendar2